<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
<s:if test="userDetial.username!=''">
<s:property value="userDetial.username"/>
</s:if>
<s:else>
<s:property value="userDetial.eusername"/>
</s:else>
</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/tools/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/toupiao.js"></script>
<script type="text/javascript">
      function addFriend(userId)
		 {
		 if(ProductVote("brandUser"+userId))
	      {
		    $.post("groupbyajax/user!addFriend.action",{userId:userId,flag:2},function(data){
		        
		        
		         if(data.success==true)
		         {
		            alert("关注成功！");
		         }else if(data.success=="error")
		         {
		          delCookie("sigleUser"+userId);
		           alert("不能关注自己！");
		         }else if(data.success==false)
		         {
		          delCookie("sigleUser"+userId);
		           alert("已经关注过！");
		         }else
		         {
		          delCookie("sigleUser"+userId);
		            alert("请登录！");
		         }
		    });
		    }
		 }
</script>
</head>
<body>
<div class="container">
<jsp:include page="../head.jsp"/> 

<div class="ge2">
     <div class="ge2_top"></div>
	 <div class="ge2_con">
     <div class="ge2_left">
        <a href="user!brandUserPageMore.action?userId=<s:property value="userId"/>">
          <s:if test="userDetial.image.equals('')">
				          <img src="uploadFile/img.gif"  class="img4" style="max-width: 270px;width:expression(this.width > 270 && this.width > this.height ? 270 : true); height: expression(this.height > 219 ? 219 : true);"/>
				      </s:if>
				      <s:else>
				         <img src="uploadFile/<s:property value="userDetial.image"/>" class="img4" style="max-width: 270px;max-height:219px;width:expression(this.width > 270 && this.width > this.height ? 270 : true); height: expression(this.height > 219 ? 219 : true);"/>
		 </s:else>
         </a> 
     <div class="din"><a href="javascript:addFriend(<s:property value="userId"/>);" target="_parent">关注</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="user/user!brandUserCriticism.action?userId=<s:property value="userId"/>" target="_parent">评价</a></div></div>
	 <div class="ge2_right" style="height: 220px;">
	       <span style="background-color:#ffffff;">
	            品牌分类:
	            <s:iterator  value="categoryList" id="id" status="status">
	               <s:property value="categoryName"/>&nbsp;&nbsp;
	            </s:iterator>
	      </span><br/>
	      <span style="background-color:#ffffff;">品牌名称:<s:property value="userDetial.username"/></span><br/>
	      <div>
	      <s:if test="userDetial.describale.length()>500">
	       <s:property value="userDetial.describale.substring(0,450)" escape="false"/>
	      </s:if>
	      <s:else>
	         <s:property value="userDetial.describale" escape="false"/>
	      </s:else>
	     
	      </div>
	       
	      </div>
	 <div class="clear"></div>
	 </div>
	 <div class="ge2_bot">
	 <s:if test="userDetial.describale.length()>500">
	 <a href="user!brandUserPageMore.action?userId=<s:property value="userId"/>" style="color:#9C2684;float:right;margin-top: -5px; margin-right: 20px;">（更多）</a>
	  </s:if>
	 </div>
</div>
<div class="content">
<div class="wrap">
         <div class="left">
               <div class="xiangche">
			        <div class="xiangce_top">
			        <s:if test="#session.user.id==userId">
			        <a href="admin/admin.jsp" target="_blank" id="ziti_a_right">+添加新图片</a>
			        </s:if>
			        <a >
			            <s:property value="userDetial.username"/>的相册
			        </a>
			        <span class="ziti_span">....................</span><a href="user/branduser!picturesList.action?currentPage=1&userId=<s:property value="userId"/>" target="_parent" id="ziti_a">更多</a>
					</div>
					<div class="xiangce_con">
					     <div class="xian_top"></div>
						 <div class="xian_con">
						        <s:iterator value="picturesList" id="id" status="status">
							        <div class="boxx1">
							             <a href="user/branduser!showPhotoList.action?currentPage=1&userId=<s:property value="#id[0]"/>&picId=<s:property value="#id[8]"/>&photoName=<s:property value="#id[1]"/>">
									      <div class="boxx_top" style="background:url(uploadFile/<s:property value="#id[4]"/>) no-repeat -80px -80px;height:170px;">
										  </div>
										  </a>
										  <div class="boxx_con"><a href="user/branduser!showPhotoList.action?currentPage=1&userId=<s:property value="#id[0]"/>&picId=<s:property value="#id[8]"/>&photoName=<s:property value="#id[1]"/>"><s:property value="#id[1]"/></a>&nbsp;<span><s:property value="#id[5].substring(0,10)"/></span>
										  </div>
									</div>
						        </s:iterator>
								<!--end boxx-->
								<div class="clear"></div>
						 </div>
						 <div class="xian_bot"></div>
						 
					</div>
					<div class="xiangce_bot">
					</div>
			   </div>
		
		       <div class="official">
			         <div class="official_top">
			         <s:if test="#session.user.id==userId">
			         <a href="admin/admin.jsp" target="_blank" id="ziti_a_right">+添加新资讯</a>
			          </s:if>
			         <a  target="_parent"> <s:property value="userDetial.username"/>的资讯</a><span class="ziti_span">....................</span><a href="user/branduser!brandInforAllList.action?currentPage=1&userId=<s:property value="userId"/>" target="_parent" id="ziti_a">更多</a>
					
					 </div>
					 <div class="official_con">
					     <ul class="offi">
					     <s:iterator value="brandList1" id="id" status="status">
						 <li>
						     
						      <div class="offi_left">
							   <a href="user/branduser!brandSingleCategoryList.action?currentPage=1&category=<s:property value="#id[1].id"/>&userId=<s:property value="userId"/>" target="_parent" class="zixun"><s:property value="#id[1].categoryName"/></a>
							   <div> <img src="uploadFile/<s:property value="#id[0].image1"/>" style="max-width:120px;max-height:120px;width:expression(this.width > 120 && this.width > this.height ? 120 : true); height: expression(this.height > 120 ? 120 : true);"/></div>
							  </div>
							  <div class="offi_right">
							    <a href="user/branduser!singleBrand.action?currentPage=1&category=<s:property value="#id[1].id"/>&brandId=<s:property value="#id[0].id"/>&userId=<s:property value="userId"/>" target="_parent" class="zixun"><s:property value="#id[0].title"/></a>
								<br/>&nbsp;&nbsp;&nbsp;&nbsp;
								
                              <s:property value="@groupby.util.UtilsTools@deleteImgStr(#id[0].content,180,'...')"/><br/>

							  </div>
							  <div class="clear"></div>
							  
						 </li>
						  </s:iterator>
						
						 </ul>
						  
					 </div>
			   </div>
				<div class="official">
				     <div class="official_top">
				     
				        <a href="admin/brand/addTopic.jsp?userId=<s:property value="userId"/>" target="_blank" id="ziti_a_right">+添加新话题</a>
				     
				     <a  target="_parent"> <s:property value="userDetial.username"/>的论坛</a><span class="ziti_span">....................</span><a href="user/branduser!topicList.action?currentPage=1&userId=<s:property value="userId"/>" target="_parent"  id="ziti_a">更多</a>
					 </div>
					 <div class="official_con">
					      <ul class="of">
					     
					          <li>
					        <div class="t1">
					           <a  target="_parent" class="zixun">话题</a>
					        </div>
					        <div class="t2">
					           <a  target="_parent" class="zixun">发布者</a>
					         </div>
					         <div class="t3">
					            <a target="_parent" class="zixun">回应</a>
					         </div>
					         <div class="t4">
					         <a target="_parent" class="zixun">最后发布</a>
					         </div>
					         <div class="clear"></div>
					         </li>
					      
					        <s:iterator value="topicList" id="id" status="status">
					          <li>
					        <div class="t1">
					           <a href="user/branduser!singleTopic.action?currentPage=1&userId=<s:property value="userId"/>&topicId=<s:property value="#id[0].id"/>"><s:property value="#id[0].title"/></a>
					        </div>
					        <div class="t2">
					           <s:property value="#id[1].username"/>
					         </div>
					         <div class="t3">
					            <s:property value="#id[0].replyCount"/>
					         </div>
					         <div class="t4">
					         <s:property value="#id[0].replyLastTime.substring(2,16)"/>
					         </div>
					         <div class="clear"></div>
					         </li>
					      </s:iterator>
						 </ul>
					 </div>
				</div>
	
		
</div>
	  
	  
	  
	  
	<div class="right">
       
		<div  class="img4">
		<a href="<s:property value="#application.systemInfor.adImage[8].split(',')[1]"/>">
		<img src="uploadFile/ad/<s:property value="#application.systemInfor.adImage[8].split(',')[1]"/>" width="300" height="323" /></a></div>
	    
		 <div class="notice">
		        <div class="box2_top"><a >关注我的人</a><span class="ziti_span">....................</span><a href="user/user!myFriendList.action?current=1&userId=${userId }" id="ziti_a">更多</a></div>
				<div class="box2_con">
				     <div class="not_nei">
					 <div class="hh1">
				      <s:iterator value="myFriendList" id="id" >
				            <s:if test="#id[0].level==2">
		                      <s:set name="url">user/user!singleUserPage.action?currentPage=1&userId=<s:property value="#id[0].id"/></s:set>
				           <div class="not1" style="height:82px;">
					        <div class="not_top">
					          <a href="<s:property value="url"/>">
						          <s:if test="#id[1].image.equals('')">
						            <img src="uploadFile/img.gif" width=60 height=60/>
							      </s:if>
							      <s:else>
							         <img src="uploadFile/<s:property value="#id[1].image"/>" width=60 height=60/>
							      </s:else>
						      </a>
						 </div>
						 <div class="not_con"><a  target="_parent"><s:property value="#id[1].username"/></a></div>
					   </div>
					    </s:if>
				      </s:iterator>
					 
					 <div class="clear"></div>
					 </div>
				</div>
		 </div>
		
		
		
		
		
		
		
<div class="box2">
		      <div class="box2_top"><a>最新评论</a></div>
			  <div class="box2_con">
			  <ul class="ul2">
			      <s:iterator value="#request.groupbyCriticismList" id="id" status="status">
									   
					                      <s:set name="urlContent">user/user!brandUserCriticism.action?userId=<s:property value="userId"/></s:set>
									  <s:if test="#id[6]==2">
					                      <s:set name="url">user/user!singleUserPage.action?currentPage=1&userId=<s:property value="#id[5]"/></s:set>
									   </s:if>
									   <s:elseif test="#id[6]==3">
									      <s:set name="url">user/user!groupbyUserPage.action?currentPage=1&userId=<s:property value="#id[5]"/></s:set>
									   </s:elseif>
									   <s:elseif test="#id[6]==4">
									      <s:set name="url">user/user!brandUserPage.action?currentPage=1&userId=<s:property value="#id[5]"/></s:set>
									   </s:elseif>
								       <li>
										<div class="pic">
										   <a href="<s:property value="url"/>">
											<s:if test="#id[3].equals('')">
					                 			<img src="uploadFile/img.gif" width=60 height=60/>
								            </s:if>
								            <s:else>
								                 <img src="uploadFile/<s:property  value="#id[3]"/>" width=60 height=60/>
								            </s:else>
								            </a>
										</div>
										<div class="info">
											<div class="xin">
												<table width="100%" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td width="65%" align="left" valign="middle">
															&nbsp;&nbsp;&nbsp;&nbsp;<s:property value="#id[2]"/>:<a href="<s:property value="url"/>" class="ziti"><s:property value="#id[4]"/></a>
														</td>
														
													</tr>

												</table>

											</div>
											<a href="<s:property value="urlContent"/>">
											<s:if test="%{#id[1].length()>50}">
											    &nbsp;&nbsp;&nbsp;&nbsp;<s:property value="#id[1].substring(0,50)"/>...
											</s:if>
											<s:else>
											    &nbsp;&nbsp;&nbsp;&nbsp;<s:property value="#id[1]"/>
											</s:else>
											</a>
										</div>
										<!--end info-->
										<div class="clear"></div>
									  </li>
									 
								   </s:iterator>
               </ul>

		</div>
		
		
</div>
		
		
		
		<!---------------------end box2-------------------------------------------------------->
		
		
	  </div>
	 
	 <div class="clear"></div>
	  
	 
	  
    </div>
	
	  
</div>
</div>

<div id="foot"><jsp:include page="../bot.jsp"></jsp:include></div>



</body>
</html>

